function soloNumerosyComa(e) {
	var key = window.event ? window.event.keyCode : e.which;
	return (key <= 13 || (key >= 48 && key <= 57) || key == 44);
}





function fnTelefono(e) {
	var key = window.event ? window.event.keyCode : e.which;
	//return (key <= 13 || (key >= 48 && key <= 57));
	if (key <= 13){
		return true; 
		}
	
	else if (key >= 48 && key <= 57){
		return true;
	}
		
	else if (key == 45){
		return true;
	}
		
	else {
		return false;
	}
	
	
}

//
function soloNumeros(e) {
	var key = window.event ? window.event.keyCode : e.which;
	return (key <= 13 || (key >= 48 && key <= 57) );
	
}

function sololetra(evt) {

	var charCode = (evt.which) ? evt.which : event.keyCode;

	if (charCode == 32)
		return true; // barra espaciadora
	if (charCode == 39)
		return true; // �
	if (charCode == 241)
		return true; // �esto funciona ocn mi maquina que esta con esppa�ol
						// peru
	if (charCode == 209)
		return true; // �
	if (charCode > 64 && charCode < 91)
		return true;// letras mayusculas
	if (charCode > 96 && charCode < 123)
		return true;// letras min�sculas

	return false; // todo lo demas negado
}

function setearLongitudNroDocumento(nroDocumento,e){
		
	var charCode = window.event ? window.event.keyCode : e.which;
	
	if (tipoDocumento.value == "03") {
		nroDocumento.maxLength = 8;
	    if (charCode <= 13 || (charCode >= 48 && charCode <= 57)){
			return true;
		}else{
			return false;
		}		
	}
	
	else{
		nroDocumento.maxLength = 15;
		if (charCode == 32)
			return false; // para que no ingrese espacios
		if (charCode <= 13)
			return true;
		if (charCode > 47 && charCode < 58)
			return true;// numeros
		if (charCode > 64 && charCode < 91)
			return true;// letras mayusculas
		if (charCode > 96 && charCode < 123)
			return true;// letras min�sculas
		if (charCode == 43 || charCode == 45)
			return true;// son el "+" y el "-"
		return false; // todo lo demas negado
	}
	
	
}